]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
quickSettings: Fix icon-name construct property in menu toggles
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 25 Mar 2023 21:55:33 +0000 (22:55 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 27 Mar 2023 14:52:50 +0000 (14:52 +0000)
Both :icon-name and :gicon are propagated to the internal QuickToggle
with property bindings. However the bindings are set up in the wrong
order:

:icon-name is a convenience property to set :gicon to a ThemedIcon
of the given name. That means binding :icon-name first will correctly
set the underlying StIcon's :gicon, but then the :gicon binding will
set it again to null.

Fix this by swapping the order in which the bindings are set up,
so that it works for both properties.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6542

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2726>

js/ui/quickSettings.js

index 8ba5ac4f42a58387461efaceed09bcc898d5dffc..64aa8941b144a46540b3495f5d86b1e98a51ccc0 100644 (file)
@@ -199,12 +199,12 @@ var QuickMenuToggle = GObject.registerClass({
         this.bind_property('subtitle',
             contents, 'subtitle',
             GObject.BindingFlags.SYNC_CREATE);
-        this.bind_property('icon-name',
-            contents, 'icon-name',
-            GObject.BindingFlags.SYNC_CREATE);
         this.bind_property('gicon',
             contents, 'gicon',
             GObject.BindingFlags.SYNC_CREATE);
+        this.bind_property('icon-name',
+            contents, 'icon-name',
+            GObject.BindingFlags.SYNC_CREATE);
 
         this.bind_property('menu-enabled',
             this._menuButton, 'visible',